Goto

Collaborating Authors

 hillel wayne


Crimes with Python's Pattern Matching • Hillel Wayne

#artificialintelligence

One of my favorite little bits of python is __subclasshook__. Abstract Base Classes with __subclasshook__ can define what counts as a subclass of the ABC, even if the target doesn't know about the ABC. You can do some weird stuff with this. Back in 2019 I used it to create non-monotonic types, where something counts as a NotIterable if it doesn't have the __iter__ method. There wasn't anything too diabolical you could do with this: nothing in Python really interacted with ABCs, limiting the damage you could do with production code.


Why Do Interviewers Ask Linked List Questions? • Hillel Wayne

#artificialintelligence

A couple years back I gave a talk on researching software history, using "linked list interview questions" as an example topic. Since referring people to a video is less accessible than just writing a blog post, I've reproduced the question here. So why do interviewers like to ask linked list questions? These answers are contradictory: if you want to know if someone knows CS fundamentals, you don't want to give them a problem they can trick their way through, and if you want to test reasoning ability, you don't want to give a problem that they've already seen in CS. Two contradictory answers tells me there's some history involved. My guess is that originally people asked LL questions for a very good reason, and then over time forgot the reason and came up with post-hoc justifications.


The Business Case for Formal Methods • Hillel Wayne

#artificialintelligence

This is an "intro packet" you can use to argue for the benefits of formal methods (FM) to your boss. Everything's in TLA, but the arguments apply equally well to Alloy, B, statecharts, etc. Adapt the material to your specific needs. Quick notational note: I'm leaving out the code verification side of formal methods, mostly because design verification is a much easier sell. Formal Methods, or FM, is a debuggable design. You write a specification of your system and properties you want it to have.